{include file="public/header" select="1" /}
<body>
<div class="title bgc">首页</div>
<div class="index-search bgc">
    <a href="{:url('product/search')}">
        <i class="layui-icon layui-icon-search"></i>
        <input type="text" placeholder="请输入搜索内容" readonly/>
    </a>
</div>

<div class="swiper">
    <div class="swiper-container">
        <div class="swiper-wrapper">
            {foreach name="carousel" item="vo" }
            <div class="swiper-slide">
                {if $vo.link}
                <a href="{$vo.link}"><img src="{$vo.images}" alt=""/></a>
                {else}
                <img src="{$vo.images}" alt=""/>
                {/if}

            </div>
            {/foreach}

        </div>
        <div class="swiper-pagination"></div>
    </div>
</div>

<div class="index-message edge bgc">
    <div class="message">
        <i class="layui-icon layui-icon-speaker"></i>
        <div class="message-news">
            <div class="swiper-wrapper">
                {foreach name="news" item="vo" }
                <div class="swiper-slide" onclick="load_href('{:url(\'news/info\')}?id={$vo.id}',2)">{$vo.title}</div>
                {/foreach}
            </div>
        </div>
        <a href="{:url('news/index')}">更多<i class="layui-icon layui-icon-right"></i></a>
    </div>
</div>

<ul class="nav edge bgc">
    {foreach name="cate" item="vo" }
    <li onclick="load_href('{:url(\'product/index\')}?cate_1={$vo.id}',2)">
        <img src="{$vo.icon}" alt=""/>
        <p>{$vo.title}</p>
    </li>
    {/foreach}
    <li onclick="load_href('{:url(\'index/communal\')}?type=company',2)">
        <img src="/static/index/img/icon_account.png" alt=""/>
        <p>公司介绍</p>
    </li>
    <li onclick="layer.msg('少这个页面，暂时没做')">
        <img src="/static/index/img/icon_news.png" alt=""/>
        <p>邀请中心</p>
    </li>
</ul>

<div class="rec-div">
    <img class="index-img" src="/static/index/img/recommend.png" alt=""/>
</div>

<ul class="product-list tpl_list"></ul>

<script id="template" type="text/html">
    {{# for(var i=0;i<d.data.length ;i++){ }}
    <li class="bgc">
        <a href="{:url('product/details')}?id={{d.data[i].id}}">
            <div>
                <img src="{{d.data[i].icon}}" alt=""/>
            </div>
            <p>{{d.data[i].title}}</p>
            <p>￥{{d.data[i].price}} </p>
        </a>
    </li>
    {{# } }}
</script>
{include file="public/nav" select="1" /}
</body>
{include file="public/footer" select="1" /}
<script>

    $(function () {
        getFlow(1, "{:url('product/getList')}?pick=1");
    })

    new Swiper(".swiper-container", {
        pagination: {
            el: ".swiper-pagination",
            // clickable: true,
        },
        autoplay: {
            delay: 3000,
            disableOnInteraction: false,
        },
        loop: true,
    })
    new Swiper(".message-news", {
        direction: "vertical",
        autoplay: {
            delay: 3000,
            disableOnInteraction: false,
        },
        loop: true,
    })
</script>
